<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>工业展会 - 模切材料小管家</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            /* TDesign 工业品色彩系统 */
            --primary-color: #0052d9;
            --primary-light: #266fe8;
            --primary-dark: #003cab;
            --secondary-color: #f2f3ff;
            --accent-color: #e37318;
            --success-color: #00a870;
            --warning-color: #ed7b2f;
            --error-color: #d54941;
            
            /* 背景色系 */
            --bg-color-page: #f5f7fa;
            --bg-color-container: #ffffff;
            --bg-color-secondray: #f8f9fc;
            
            /* 边框和分割线 */
            --border-color: #e7e7e7;
            --border-color-light: #f0f0f0;
            --border-radius-small: 3px;
            --border-radius-medium: 6px;
            --border-radius-large: 9px;
            
            /* 文字色彩 */
            --text-primary: #1a1a1a;
            --text-secondary: #4e5969;
            --text-placeholder: #86909c;
            --text-disabled: #c9cdd4;
            
            /* 阴影系统 */
            --shadow-1: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            --shadow-2: 0 1px 4px 0 rgba(0, 0, 0, 0.08);
            --shadow-3: 0 4px 8px 0 rgba(0, 0, 0, 0.12);
            
            /* 间距系统 */
            --space-1: 4px;
            --space-2: 8px;
            --space-3: 12px;
            --space-4: 16px;
            --space-5: 20px;
            --space-6: 24px;
            --space-8: 32px;
            --space-10: 40px;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }
        
        body {
            background-color: var(--bg-color-page);
            color: var(--text-primary);
            font-size: 14px;
            line-height: 1.5;
            padding-bottom: 64px;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }
        
        .container {
            max-width: 480px;
            margin: 0 auto;
            background: var(--bg-color-container);
            min-height: 100vh;
            box-shadow: var(--shadow-1);
            position: relative;
            overflow-x: hidden;
        }
        
        /* 头部样式 */
        .header {
            background: var(--primary-color);
            color: white;
            padding: var(--space-4);
            position: relative;
            z-index: 10;
        }
        
        .top-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .back-btn {
            font-size: 18px;
            cursor: pointer;
            opacity: 0.9;
            transition: opacity 0.2s ease;
        }
        
        .back-btn:hover {
            opacity: 1;
        }
        
        .page-title {
            font-weight: 500;
            font-size: 16px;
        }
        
        .actions {
            display: flex;
            gap: var(--space-4);
        }
        
        .actions i {
            font-size: 16px;
            cursor: pointer;
            opacity: 0.9;
            transition: opacity 0.2s ease;
        }
        
        .actions i:hover {
            opacity: 1;
        }
        
        /* 分类导航 - 改为按钮式布局 */
        .category-nav {
            background: var(--bg-color-container);
            padding: var(--space-4);
            border-bottom: 1px solid var(--border-color-light);
            position: sticky;
            top: 0;
            z-index: 5;
        }
        
        .category-tabs {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: var(--space-3);
        }
        
        .category-tab {
            padding: var(--space-3) var(--space-2);
            border-radius: var(--border-radius-medium);
            background: var(--bg-color-secondray);
            color: var(--text-secondary);
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: center;
            border: 1px solid var(--border-color-light);
        }
        
        .category-tab.active {
            background: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }
        
        .category-tab:hover {
            background: var(--primary-light);
            color: white;
            border-color: var(--primary-light);
        }
        
        /* 主要内容区域 */
        .main-content {
            padding: var(--space-4);
        }
        
        /* 展会列表 */
        .news-list {
            display: flex;
            flex-direction: column;
            gap: var(--space-4);
        }
        
        .news-item {
            background: var(--bg-color-container);
            border-radius: var(--border-radius-medium);
            padding: var(--space-4);
            box-shadow: var(--shadow-1);
            border: 1px solid var(--border-color-light);
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .news-item:hover {
            box-shadow: var(--shadow-2);
            transform: translateY(-1px);
        }
        
        .news-header {
            display: flex;
            gap: var(--space-3);
            margin-bottom: var(--space-3);
        }
        
        .news-image {
            width: 80px;
            height: 60px;
            background: var(--bg-color-secondray);
            border-radius: var(--border-radius-medium);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            overflow: hidden;
        }
        
        .news-image i {
            font-size: 20px;
            color: var(--text-placeholder);
        }
        
        .news-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .news-content {
            flex: 1;
        }
        
        .news-title {
            font-size: 15px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: var(--space-2);
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .news-summary {
            font-size: 13px;
            color: var(--text-secondary);
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .news-meta {
            display: flex;
            align-items: center;
            font-size: 12px;
            color: var(--text-placeholder);
        }
        
        .news-date {
            display: flex;
            align-items: center;
        }
        
        .news-date i {
            margin-right: var(--space-1);
        }
        
        /* 分类标签 */
        .news-category {
            display: inline-block;
            background: var(--accent-color);
            color: white;
            padding: var(--space-1) var(--space-2);
            border-radius: var(--border-radius-small);
            font-size: 10px;
            margin-bottom: var(--space-2);
        }
        
        
        /* 底部导航 */
        .tabbar {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--bg-color-container);
            border-top: 1px solid var(--border-color);
            display: flex;
            z-index: 100;
            max-width: 480px;
            margin: 0 auto;
            height: 64px;
        }
        
        .tab-item {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: var(--space-2) 0;
            cursor: pointer;
            transition: color 0.2s ease;
            color: var(--text-placeholder);
        }
        
        .tab-item.active {
            color: var(--primary-color);
        }
        
        .tab-item:hover {
            color: var(--primary-light);
        }
        
        .tab-item i {
            font-size: 18px;
            margin-bottom: var(--space-1);
        }
        
        .tab-item span {
            font-size: 10px;
        }
        
        /* 加载更多 */
        .load-more {
            text-align: center;
            padding: var(--space-4);
            color: var(--text-secondary);
            cursor: pointer;
        }
        
        .load-more:hover {
            color: var(--primary-color);
        }
        
        /* 空状态 */
        .empty-state {
            text-align: center;
            padding: var(--space-10);
            color: var(--text-secondary);
        }
        
        .empty-state i {
            font-size: 48px;
            margin-bottom: var(--space-4);
            opacity: 0.5;
        }
        
        .empty-title {
            font-size: 16px;
            margin-bottom: var(--space-2);
        }
        
        .empty-desc {
            font-size: 14px;
            opacity: 0.8;
        }
    </style>
</head>
<body>
    <div class="container">
        <!-- 头部区域 -->
        <div class="header">
            <div class="top-bar">
                <div class="back-btn" onclick="history.back()">
                    <i class="fas fa-arrow-left"></i>
                </div>
                <div class="page-title">工业展会</div>
                <div class="actions">
                    <i class="fas fa-search" onclick="searchExhibition()"></i>
                </div>
            </div>
        </div>
        
        <!-- 分类导航 -->
        <div class="category-nav">
            <div class="category-tabs">
                <div class="category-tab active" data-category="all">全部展会</div>
                <div class="category-tab" data-category="material">模切材料</div>
                <div class="category-tab" data-category="processing">模切加工</div>
            </div>
        </div>
        
        <!-- 主要内容区域 -->
        <div class="main-content">
            <!-- 展会列表 -->
            <div class="news-list" id="exhibitionList">
                <!-- 展会列表将通过JavaScript动态生成 -->
            </div>
            
            <!-- 加载更多 -->
            <div class="load-more" onclick="loadMoreExhibitions()">
                <i class="fas fa-plus-circle"></i> 加载更多
            </div>
        </div>
        
        <!-- 底部导航 -->
        <div class="tabbar">
            <div class="tab-item" onclick="location.href='home.html'">
                <i class="fas fa-home"></i>
                <span>首页</span>
            </div>
            <div class="tab-item" onclick="location.href='demand-list.html'">
                <i class="fas fa-search"></i>
                <span>求购</span>
            </div>
            <div class="tab-item" onclick="location.href='publish-select.html'">
                <i class="fas fa-plus-circle"></i>
                <span>发布</span>
            </div>
            <div class="tab-item" onclick="location.href='consultation.html'">
                <i class="fas fa-comments"></i>
                <span>客服</span>
            </div>
            <div class="tab-item" onclick="location.href='profile.html'">
                <i class="fas fa-user"></i>
                <span>我的</span>
            </div>
        </div>
    </div>
    
    <script>
        // 展会数据
        const exhibitionData = [
            {
                id: 1,
                title: "2024中国国际模切工业展览会",
                summary: "汇聚全球模切材料行业顶尖企业，展示最新技术和产品解决方案，促进行业交流与合作",
                category: "material",
                categoryName: "模切材料",
                publishTime: "2024-03-15 09:30"
            },
            {
                id: 2,
                title: "华南包装印刷工业展",
                summary: "专注包装印刷及相关材料展示，涵盖胶粘材料、模切设备、印刷技术等多个领域",
                category: "processing",
                categoryName: "模切加工",
                publishTime: "2024-02-20 14:20"
            },
            {
                id: 3,
                title: "亚洲电子材料博览会",
                summary: "展示电子行业最新材料技术，包括导电胶、绝缘材料、屏蔽材料等电子模切材料",
                category: "material",
                categoryName: "模切材料",
                publishTime: "2024-04-08 16:45"
            },
            {
                id: 4,
                title: "汽车轻量化材料展览会",
                summary: "聚焦新能源汽车材料创新，展示汽车内饰胶粘材料、密封材料等轻量化解决方案",
                category: "material",
                categoryName: "模切材料",
                publishTime: "2024-05-12 11:15"
            },
            {
                id: 5,
                title: "第十八届中国胶粘剂和胶粘带展览会",
                summary: "国内最大规模的胶粘行业专业展会，涵盖工业胶粘剂、胶粘带、模切加工等全产业链",
                category: "processing",
                categoryName: "模切加工",
                publishTime: "2024-02-28 13:50"
            },
            {
                id: 6,
                title: "华东工业自动化展",
                summary: "展示工业4.0最新技术，包括自动化模切设备、智能生产线、工业机器人等",
                category: "processing",
                categoryName: "模切加工",
                publishTime: "2024-06-18 10:25"
            }
        ];
        
        // 当前选中的分类
        let currentCategory = 'all';
        
        // 初始化页面
        function initPage() {
            renderExhibitionList();
            initCategoryTabs();
        }
        
        // 渲染展会列表
        function renderExhibitionList() {
            const list = document.getElementById('exhibitionList');
            const filteredExhibitions = currentCategory === 'all' 
                ? exhibitionData 
                : exhibitionData.filter(exhibition => exhibition.category === currentCategory);
            
            if (filteredExhibitions.length === 0) {
                list.innerHTML = `
                    <div class="empty-state">
                        <i class="fas fa-calendar-times"></i>
                        <div class="empty-title">暂无展会</div>
                        <div class="empty-desc">该分类下暂时没有展会信息</div>
                    </div>
                `;
                return;
            }
            
            list.innerHTML = filteredExhibitions.map(exhibition => {
                return `
                    <div class="news-item" onclick="viewExhibitionDetail(${exhibition.id})">
                        <div class="news-category">${exhibition.categoryName}</div>
                        <div class="news-header">
                            <div class="news-image">
                                <i class="fas fa-calendar-alt"></i>
                            </div>
                            <div class="news-content">
                                <div class="news-title">${exhibition.title}</div>
                                <div class="news-summary">${exhibition.summary}</div>
                            </div>
                        </div>
                        <div class="news-meta">
                            <div class="news-date">
                                <i class="fas fa-clock"></i>
                                发布时间：${exhibition.publishTime}
                            </div>
                        </div>
                    </div>
                `;
            }).join('');
        }
        
        // 初始化分类选项卡
        function initCategoryTabs() {
            const tabs = document.querySelectorAll('.category-tab');
            tabs.forEach(tab => {
                tab.addEventListener('click', function() {
                    // 移除所有active类
                    tabs.forEach(t => t.classList.remove('active'));
                    // 添加active类到当前选中的tab
                    this.classList.add('active');
                    // 更新当前分类
                    currentCategory = this.dataset.category;
                    // 重新渲染展会
                    renderExhibitionList();
                });
            });
        }
        
        // 查看展会详情
        function viewExhibitionDetail(exhibitionId) {
            location.href = `news-detail.html?id=${exhibitionId}`;
        }
        
        // 搜索展会
        function searchExhibition() {
            alert('搜索功能开发中...');
        }
        
        // 加载更多展会
        function loadMoreExhibitions() {
            alert('正在加载更多展会...');
        }
        
        // 页面加载完成后初始化
        document.addEventListener('DOMContentLoaded', function() {
            initPage();
        });
    </script>
</body>
</html>